import 'package:flutter/material.dart';

class CommomActionButton extends StatelessWidget {
  const CommomActionButton({
    Key? key,
    required this.name,
    this.onPressed,
  }) : super(key: key);
  final String name;
  final void Function()? onPressed;
  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.only(right: 10, left: 10),
      child: SizedBox(
        width: double.infinity,
        height: 45,
        child: ElevatedButton(
          onPressed: onPressed,
          child: Text(name),
          style: ButtonStyle(
              shape: MaterialStateProperty.all(const StadiumBorder()),
              textStyle: MaterialStateProperty.all(
                  const TextStyle(fontSize: 16, fontWeight: FontWeight.w500))),
        ),
      ),
    );
  }
}
